home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Mac Power 1997 December
/
MACPOWER-1997-12.ISO.7z
/
MACPOWER-1997-12.ISO
/
AMUG
/
PROGRAMMING
/
Raven 1.2 Examples.sit
/
Raven 1.2 Examples
/
Quill
/
Source
/
IncludeViewEditor.cpp
< prev
next >
Wrap
Text File
|
1997-02-20
|
3KB
|
125 lines
/*
* File: IncludeViewEditor.cpp
* Summary: A view that knows how to edit a TIncludeView.
* Written by: Jesse Jones
*
* Copyright ゥ 1996 Jesse Jones.
* For conditions of distribution and use, see copyright notice in ZTypes.h
*
* Change History (most recent first):
*
* <-> 12/01/96 JDJ Created
*/
#include "IncludeViewEditor.h"
#include <ZTextBox.h>
// ===================================================================================
// class CEditIncludeViewCommand
// ===================================================================================
//---------------------------------------------------------------
//
// CEditIncludeViewCommand::~CEditIncludeViewCommand
//
//---------------------------------------------------------------
CEditIncludeViewCommand::~CEditIncludeViewCommand()
{
}
//---------------------------------------------------------------
//
// CEditIncludeViewCommand::CEditIncludeViewCommand
//
//---------------------------------------------------------------
CEditIncludeViewCommand::CEditIncludeViewCommand(TIncludeView* pane, const SIncludeViewInfo& oldInfo, const SIncludeViewInfo& newInfo) : Inherited(pane, oldInfo, newInfo)
{
}
//---------------------------------------------------------------
//
// CEditIncludeViewCommand::UpdatePane
//
//---------------------------------------------------------------
void CEditIncludeViewCommand::UpdatePane(const SIncludeViewInfo& info)
{
mPane->SetID(info.viewID);
}
#pragma mark -
// ===================================================================================
// CIncludeViewEditor
// ===================================================================================
static TReanimatorRegister<CIncludeViewEditor> sIncludeViewEditorRegistrar;
//---------------------------------------------------------------
//
// CIncludeViewEditor::~CIncludeViewEditor
//
//---------------------------------------------------------------
CIncludeViewEditor::~CIncludeViewEditor()
{
}
//---------------------------------------------------------------
//
// CIncludeViewEditor::CIncludeViewEditor
//
//---------------------------------------------------------------
CIncludeViewEditor::CIncludeViewEditor(TView* superView) : Inherited(superView)
{
}
//---------------------------------------------------------------
//
// CIncludeViewEditor::Create [static]
//
//---------------------------------------------------------------
MReanimatable* CIncludeViewEditor::Create(MReanimatable* parent)
{
return new CIncludeViewEditor(dynamic_cast<TView*>(parent));
}
//---------------------------------------------------------------
//
// CIncludeViewEditor::GetEditorInfo
//
//---------------------------------------------------------------
SIncludeViewInfo CIncludeViewEditor::GetEditorInfo() const
{
SIncludeViewInfo info;
TTextBox* textBox = nil;
textBox = dynamic_cast<TTextBox*>(this->FindSubPane("View ID"));
info.viewID = textBox->GetValue();
return info;
}
//---------------------------------------------------------------
//
// CIncludeViewEditor::SetEditorInfo
//
//---------------------------------------------------------------
void CIncludeViewEditor::SetEditorInfo(const SIncludeViewInfo& info)
{
TTextBox* textBox = nil;
textBox = dynamic_cast<TTextBox*>(this->FindSubPane("View ID"));
textBox->SetValue(info.viewID);
}